<!--{include control/admin/tpl/admin_header}--> 
<div class="page_title">
  <h1>{$_lang['task_config']}</h1>
    <div class="tool">
       <a href="{BASE_URL}/index.php/task/{$model_info['model_code']}_admin_config" class="here">{$_lang['basic_config']}</a>
       <a href="{BASE_URL}/index.php/task/{$model_info['model_code']}_admin_config/control">{$_lang['control_config']}</a>
     </div>
</div>
<div class="box post">
	 <form action="{BASE_URL}/index.php/task/{$model_info['model_code']}_admin_config/config_save" method="post">
	 	<input type="hidden" name="formhash" value="{FORMHASH}">
	 	<input type="hidden" name="fds[model_id]" value="{$model_info['model_id']}">
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
	    <tr>
		   <th scope="row" width="200">{$_lang['model_name']}{$_lang['zh_mh']}</th>
		    <td>
		       <input type="text" class="txt" name="fds[model_name]" value="$model_info['model_name']">
			</td>
        </tr>
		<tr>
		   <th scope="row" width="200">{$_lang['is_open']}{$_lang['zh_mh']}</th>
		     <td>
		        <label for="status_yes"><input type="radio" id="status_yes" name="fds[model_status]" {if $model_info['model_status']}checked{/if} value="1"> {$_lang['yes']}</label>
				<label for="status_no"><input type="radio" id="status_no" name="fds[model_status]" {if !$model_info['model_status']}checked{/if} value="0"> {$_lang['no']}</label>
			</td>
        </tr>
		<tr>
		 
        </tr>
		<tr>
		  <th scope="row" width="200">{$_lang['bind_industry']}{$_lang['zh_mh']}</th>
		    <td>
              <select onchange="p_indus_add(this.value)" style="margin-bottom:5px;">
			   <option value="">{$_lang['choose_industry']}</option>
			{loop $indus_index['0'] $indus}
				<option value="$indus['indus_id']">$indus['indus_name']</option>
			{/loop}
			  </select>
			 <br class="clear">
			 <select name="p_indus_select" id="p_indus_select" multiple=multiple style="width:160px;float:left;height:200px;overflow-y:scroll;background:white;border:#ccc solid 1px" >
			 {loop $sub_indus $k $v}
			   <option id="p_indus_select_op_{$v['indus_id']}" value="{$v['inuds_id']}">{$v['indus_name']}</option>
			 {/loop}
			 </select>
			<div style="width:80px;float:left;height:160px;overflow:hidden;margin-left:20px; text-align:center;padding-top:40px;">
				<button onclick = "moveitems()" type="button" class="input_but"><<</button><br><br>
				<button onclick = "additems()" type="button" class="input_but">>></button><br>
			</div>
			<select name="fds[indus_bid][]" id="s_indus_select" multiple=multiple style="width:160px;float:left;height:200px;overflow-y:scroll;background:white;border:#ccc solid 1px;margin-left:20px;">
			{loop $milist $k $m}
				{if !empty($m)}
				<option id="s_indus_select_op_{$m}" value="$m" selected="selected"> $indus_arr[$m]['indus_name']</option>
				{/if}
			{/loop}
			</select>
			<br class="clear">{$_lang['choose_industry_nitice']}
			</td>
         </tr>
	 	 <tr>
		    <th scope="row" width="200">{$_lang['model_description']}{$_lang['zh_mh']}</th>
		      <td>
		       <textarea cols=110 rows=12 name="fds[model_desc]"  style="width:75%;" id="tar_content"  class="xheditor {urlBase:'{BASE_URL}/',tools:'simple',skin:'nostyle',admin:'{BASE_URL}/',html5Upload:false,emotMark:false,upImgUrl:'../../index.php/ajax/upload?file_type=att'}" cols="70">$model_info['model_desc']</textarea>
			  </td>
         </tr>
		 <tr>
		  <th scope="row" width="200">&nbsp;</th>
		    <td>
		    	
			 
		         <input type="submit" name="sbt_edit" class="button"   value="{$_lang['submit']}">
		         <input type="button" onclick="history.go(-1)" value="{$_lang['return']}">
             </td>
         </tr>
        </table>
       </form>
     </div>
   </div>
</div>
<script type="text/javascript">
In('edit');
function p_indus_add(id){
	mod = "";
	{loop $indus_index $k $si}
	if(id=='$k'){
		{loop $si $i}
		if(!$('#s_indus_select_op_{$i[indus_id]}').val()){
		mod +="<option id=\"p_indus_select_op_{$i['indus_id']}\" value=\"{$i['indus_id']}\">{$i['indus_name']}</option>";
		}
		{/loop}
	}
	{/loop}
	$('#p_indus_select').html(mod);
}

function moveitems(){
	vs = $('#s_indus_select').val()+'';
	vs = vs.split(",");
	var mod = '';
	for(v=0;v<vs.length;v++){
		
		if(String(vs[v]) == "null"){
			continue;
		}
		mod+="<option value="+vs[v]+" id=\"p_indus_select_op_"+vs[v]+"\">"+$('#s_indus_select_op_'+vs[v]).html()+"</option>";
		$('#s_indus_select_op_'+vs[v]).remove();
	};
	if(mod!='')
	$('#p_indus_select').append(mod);
}

function additems(){
	vs = $('#p_indus_select').val()+'';
	vs = vs.split(",");
	var mod = '';
	for(v=0;v<vs.length;v++){
		if(String(vs[v]) == "null"){
			continue;
		}
		mod+="<option value="+vs[v]+" id=\"s_indus_select_op_"+vs[v]+"\" selected=\"selected\">"+$('#p_indus_select_op_'+vs[v]).html()+"</option>";
		$('#p_indus_select_op_'+vs[v]).remove();
	};
	if(mod!='')
	$('#s_indus_select').append(mod);
}

</script>
<!--{include control/admin/tpl/admin_footer}-->